package com.chenyue.cm.match.vo;

import com.chenyue.cm.match.domain.FormatLiveRecord;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @Author: ljy
 * @Title: thirdCreateMatch
 * @Description: 第三方机构 创建赛事 传入实体参数
 * @Date: 2021-09-08
 */
@Data
public class ThirdCreateMatch {

    @ApiModelProperty(value = "编辑传主键")
    private Integer id;

    @ApiModelProperty(value = "比赛权限（1公开 0非公开）")
    private Integer isPublic;

    @ApiModelProperty(value = "比赛规则（1单人 2团体）")
    private Integer matchGroup;

    @ApiModelProperty(value = "是否需要实名 1需要 2不需要")
    private Integer needVerify;

    @ApiModelProperty(value = "参赛人数")
    private Integer signCount;

    @ApiModelProperty(value = "参赛类型（1单人单项/2单人多项/3多人多项）")
    private Integer matchType;

    @ApiModelProperty(value = "比赛分类（分类列表的id）")
    private Integer type;

    @ApiModelProperty(value = "比赛分类名称（编辑回显）")
    private String typeName;

    @ApiModelProperty(value = "赛事项目ids（单个分类下的项目表的id，用逗号分隔）")
    private String matchItems;

    @ApiModelProperty(value = "赛事项目名称 编辑回显")
    private String matchItemNames;

    @ApiModelProperty(value = "比赛名称")
    private String name;

    @ApiModelProperty(value = "比赛地区（例如山西省太原市小店区）")
    private String matchArea;

    @ApiModelProperty(value = "省会code")
    private Integer provinceCode;

    @ApiModelProperty(value = "城市code")
    private Integer cityCode;

    @ApiModelProperty(value = "区域code")
    private Integer areaCode;

    @ApiModelProperty(value = "报名开始时间(yyyy-MM-dd HH:mm:ss)")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "报名结束时间(yyyy-MM-dd HH:mm:ss)")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "比赛要求")
    private String description;

    @ApiModelProperty(value = "连麦时长（单位：分钟）")
    private Integer chatTime;

    @ApiModelProperty(value = "付费方式 0免费 1纯金币 2纯钱")
    private Integer payType;

    @ApiModelProperty(value = "报名价格")
    private Double signPrice;

    @ApiModelProperty(value = "每报名一人奖励积分")
    private Integer integral;

    @ApiModelProperty(value = "赛事banner")
    private String bannerList;

    @ApiModelProperty(value = "设置赛程")
    private List<MatchFormat> formats;

    @Data
    public static class MatchFormat {

        @ApiModelProperty(value = "开始时间（yyyy-MM-dd HH:mm:ss）")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date startTime;

        @ApiModelProperty(value = "结束时间（yyyy-MM-dd HH:mm:ss）")
        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private Date endTime;

        @ApiModelProperty(value = "晋级方式（0自动 1比赛完成手动晋级）")
        private Integer updateType;

        @ApiModelProperty(value = "进行顺序（1初赛 2复赛 3决赛）")
        private Integer arrangeOrder;

        @ApiModelProperty(value = "晋级人数")
        private Integer promotionNum;

        @ApiModelProperty(value = "晋级分数")
        private Integer promotionScore;

        @ApiModelProperty(value = "直播间列表")
        private List<FormatLiveRecord> liveList;
    }
}
